//ABC414  A.cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int l, r;
  cin >> l >> r;
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    int x, y;
    cin >> x >> y;
    if (x <= l && y >= r) {
      ans++;    
    }
  }
  cout << ans;
  return 0;
}